﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace wamr.Worker
{
    class JSONClasses
    {
        public class JSONCopyRootObject
        {
            public JSONClasses.JSONCopy copy { get; set; }
        }

        public class JSONCopyBlobRootObject
        {
            public JSONClasses.JSONCopyBlob copyblob { get; set; }
        }

        public class JSONExportRootObject
        {
            public JSONClasses.JSONExport export { get; set; }
        }

        public class JSONBackupRootObject
        {
            public JSONBackup backup { get; set; }
        }

        public class JSONCreateDeploymentRootObject
        {
            public JSONCreateDeployment createdeployment { get; set; }
        }

        public class JSONDeleteDeploymentRootObject
        {
            public JSONDeleteDeployment deletedeployment { get; set; }
        }

        public class JSONPackage
        {
            public string PackageName { get; set; }
            public string ConfigFileName { get; set; }
        }

        public class JSONService
        {
            public string Label { get; set; }
            public string ServiceName { get; set; }
            public string Slot { get; set; }
        }

        public class JSONCreateDeployment
        {
            public string SubscriptionAlias { get; set; }
            public JSONPackage Package { get; set; }
            public JSONService Service { get; set; }
        }

        public class JSONDeleteDeployment
        {
            public string SubscriptionAlias { get; set; }
            public JSONService Service { get; set; }
        }

        public class JSONSource
        {
            public string servername { get; set; }
            public string databasename { get; set; }
        }

        public class JSONTarget
        {
            public string servername { get; set; }
            public string databasename { get; set; }
            public string connectionalias { get; set; }
        }

        public class JSONBlob
        {
            public string blobname { get; set; }
            public string containername { get; set; }
        }

        public class JSONCopy
        {
            public string overwritedatabase { get; set; }
            public string sqladminuser { get; set; }
            public string sqladminpw { get; set; }
            public string dependency { get; set; }
            public JSONClasses.JSONSource source { get; set; }
            public JSONClasses.JSONTarget target { get; set; }
        }

        public class JSONCopyBlob
        {
            public string sourcestorageaccountalias { get; set; }
            public string targetstorageaccountalias { get; set; }
            public JSONClasses.JSONBlob source { get; set; }
            public JSONClasses.JSONBlob target { get; set; }
        }

        public class JSONExport
        {
            public string overwriteblob { get; set; }
            public string waitfordatabase { get; set; }
            public string useexportservice { get; set; }
            public string sqladminuser { get; set; }
            public string sqladminpw { get; set; }
            public string dependson { get; set; }
            public JSONClasses.JSONSource source { get; set; }
            public JSONClasses.JSONTarget target { get; set; }
        }

        public class JSONBackup
        {
            public string overwriteblob { get; set; }
            public string overwritedatabase { get; set; }
            public string waitfordatabase { get; set; }
            public string useexportservice { get; set; }
            public string sqladminuser { get; set; }
            public string sqladminpw { get; set; }
            public JSONSource source { get; set; }
            public JSONTarget target { get; set; }
        }

    }
}
